package jee.boot.entity.task;

import jee.boot.common.annotation.Table;
import jee.boot.common.basic.DataEntity;

/**
 * 导入导出任务
 */
@Table(name = "st_iexp_task_item")
public class IexpTaskItem extends DataEntity<IexpTaskItem> {
    private IexpTask head;//委托服务类,

    private String message;//详情,

    public IexpTaskItem() {
    }

    public IexpTaskItem(String id) {
        super(id);
    }

    public IexpTaskItem(IexpTask head) {
        this.head = head;
    }

    public IexpTask getHead() {
        return head;
    }

    public void setHead(IexpTask head) {
        IexpTask tempIexpTask = new IexpTask();
        tempIexpTask.setId(head.getId());
        this.head = tempIexpTask;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    /**
     * 补充详情
     * @param message
     * @return
     */
    public IexpTaskItem addMessage(String message){
        StringBuilder sb=new StringBuilder();
        sb.append(getMessage()!=null?getMessage():"").append(message).append(";");
        setMessage(sb.toString());
        return this;
    }
}
